#!/bin/bash
#
# process nhs records reading for import in to sabre
# nhs records are pushed to the server from the nhs server, 
# they arrive in /home/nhsrecords/
#
MARCIMPORT=/usr/local/marcimport
SABRE=/usr/local/vufind-smu
# Disable JETTY_CONSOLE output -- it causes problems when run by cron:
export JETTY_CONSOLE=/dev/null
#
date
# ############################################
# Pre-process nhs files
echo "Pre process mhs MARC files"
cd $MARCIMPORT/full/
rm -fr nhsprocessed.old
cp -pr nhsprocessed nhsprocessed.old
$SABRE/marc_merge_vufind.pl /home/nhsrecords/vufind_full.mrc nhsprocessed/nhsfull.mrc nhs > nhsprocessed/outfull.txt
date
